<!-- target: experienceForm(master = formPage) -->
<!-- block: crumb -->
    <!-- import: experienceFormCrumb -->
<!-- /block -->
<!-- block: formMain -->
    <!-- import: experienceFormMain -->
<!-- /block -->

<!-- target: experienceFormCrumb(master = crumb) -->
<!-- block: path -->
    <span>搜乐</span>
    <span><!-- if: ${formType} === 'create' -->新增<!-- else: -->编辑<!-- /if -->活动</span>
<!-- /block -->

<!-- target: experienceFormMain(master = customFormView) -->
<!-- block: sections -->
    <!-- import: experienceBaseContent -->
<!-- /block -->
<!-- block: submitSection -->
<button type="submit" data-ui-type="Button" data-ui-id="submit" data-ui-group="submit" data-ui-variants="warning wide" class="submit-button">确认提交</button>
<!-- /block -->

<!-- target: experienceBaseContent -->
<ol data-ui-type="Wizard" data-ui-active-index="1">
    <li data-node-number="1">基本信息</li>
    <li data-node-number="2">活动审核</li>
    <li data-node-number="3">活动上线</li>
</ol>

<section class="form-section">

    <div class="ui-form-row">
        <!-- use:
            textboxField(field = 'title', title = '活动主题', length = 120, width = 300, required = true)
        -->
    </div>

    <div class="ui-form-row">
        <!-- use:
            labelSelectorField(
                field = 'category', width = 120, title = '活动分类',
                options = ${categoryList}, required = true
            )
        -->
    </div>

    <div class="ui-form-row">
        <!-- use:
            timeField(
                dateField = 'startDate', timeField = 'startTime',
                title = '开始时间', required = true, timeList = ${timeList}
            )
        -->
    </div>

    <div class="ui-form-row">
        <!-- use:
            timeField(
                dateField = 'endDate', timeField = 'endTime',
                title = '结束时间', required = true, timeList = ${timeList}
            )
        -->
    </div>

    <!-- if: ${user.detail.address} -->
    <div class="ui-form-row">
        <!-- use:
            textboxField(
                field = 'user.detail.address.name', title = '地址',  width = 500, disabled = true
            )
        -->
    </div>
    <!-- /if -->

    <div class="ui-form-row">
        <!-- use:
            labelSelectorField(
                field = 'phone', width = 200, title = '联系电话',
                options = ${phoneList}, required = true
            )
        -->
    </div>

    <div class="ui-form-row">
        <!-- use:
            uploaderWithPreviewField(
                field = 'pic1', title = '活动图片(大图)', imageWidth = 250,
                uploadUrl = ${uploadUrl1}, required = true,
                descriptions = ['单张图片大小不超过2M']
            )
        -->
    </div>

    <div class="ui-form-row">
        <!-- use:
            uploaderWithPreviewField(
                field = 'pic2', title = '活动图片(小图)', imageWidth = 250,
                uploadUrl = ${uploadUrl2}, required = true,
                descriptions = ['单张图片大小不超过500K']
            )
        -->
    </div>

    <div class="ui-form-row">
        <!-- use:
            experienceBenefits(
                field = 'benefits', title = '活动福利', benefitsChecked = ${benefitsChecked}
            )
        -->
    </div>

    <div class="ui-form-row">
        <!-- use:
            textboxField(
                field = 'content',
                title = '活动内容', 
                width = 300,
                height = 160,
                mode = 'textarea'
            )
        -->
    </div>

    <div class="ui-form-row">
        <!-- use:
            uploaderWithPreviewListField(
                field = 'pics',
                title = '内容图片',
                imageWidth = 250,
                uploadUrl = ${uploadUrl2},
                required = true,
                descriptions = ['单张图片大小不超过500k']
            )
        -->
    </div>

    <div class="ui-form-row">
        <!-- use:
            experienceActivity(
                field = 'type',
                title = '活动类型',
                types = ${activityTypes},
                system = ${system},
                timeList = ${timeList},
                radioTab = true
            )
        -->
    </div>

</section>

<!-- target: experienceBenefits(master = formLabelValueField) -->
<!-- block: value -->
    <div data-ui-type="CheckboxPanel" data-ui-id="benefits-checkbox-panel" data-ui-expanded="${benefitsChecked}">
        <div class="ui-checkbox-custom">
            <input id="${field}-benefits" type="checkbox" value="benefits" />
            <label for="${field}-benefits">有</label>
        </div>
        <div>
            <!-- use:
                textbox(
                    field = ${field}, width = 300, height = 80, mode = 'textarea'
                )
            -->
        </div>
    </div>
<!-- /block -->


<!-- // 免费、收费、报名活动 -->
<!-- target: experienceActivity(master = formLabelBoxGroupField) -->
<!-- block: radioGroup -->
    <!-- for: ${types} as ${item}, ${index} -->
    <div>
        <input type="radio" id="${field}-${item.value}" name="${name}" value="${item.value}">
        <label for="${field}-${item.value}">${item.text}</label>
    </div>
    <!-- /for -->
<!-- /block -->

<!-- block: content -->
<!-- for: ${types} as ${item}, ${index} -->
<!-- // 收费 -->
<!-- if: ${item.value} === '2' -->
<div id="${id | dasherize}-panel-${index}">
    <div class="ui-form-row">
        <!-- use:
            textboxField(field = 'thread', title = '收费主题', width = 300, required = true)
        -->
    </div>

    <div class="ui-form-row">
        <!-- use:
            timeField(
                dateField = 'startDate1',
                timeField = 'startTime1',
                title = '开始时间',
                required = true,
                timeList = ${timeList}
            )
        -->
    </div>

    <div class="ui-form-row">
        <!-- use:
            timeField(
                dateField = 'endDate1',
                timeField = 'endTime1',
                title = '结束时间',
                required = true,
                timeList = ${timeList}
            )
        -->
    </div>

    <!-- use:
        commonTip(
            system = ${system},
            hasBookInfo = true,
            hasSeatInfo = true,
            hasSpecialTip = true
        )
    -->
</div>
<!-- /if -->
<!-- // 报名活动 -->
<!-- if: ${item.value} === '3' -->
<div id="${id | dasherize}-panel-${index}">
    <div class="ui-form-row">
        <!-- use:
            textboxField(
                id = 'enroll-thread',
                field = 'thread',
                title = '收费主题',
                width = 300,
                required = true
            )
        -->
    </div>

    <div class="ui-form-row">
        <!-- use:
            timeField(
                dateId = 'enroll-startDate1',
                dateField = 'startDate1',
                timeId = 'enroll-startTime1',
                timeField = 'startTime1',
                title = '开始时间',
                required = true,
                timeList = ${timeList}
            )
        -->
    </div>

    <div class="ui-form-row">
        <!-- use:
            timeField(
                dateId = 'enroll-endDate1',
                dateField = 'endDate1',
                timeId = 'enroll-endTime1',
                timeField = 'endTime1',
                title = '结束时间',
                required = true,
                timeList = ${timeList}
            )
        -->
    </div>

    <div class="ui-form-row">
        <!-- use:
            textboxField(
                field = 'count',
                title = '报名人数', 
                width = 100,
                required = true
            )
        -->
    </div>

    <!-- use:
        commonTip(
            system = ${system},
            bookInfoId = 'enrollBookInfo',
            hasBookInfo = true,
            seatInfoId = 'enrollSeatInfo',
            hasSeatInfo = true,
            specialTipId = 'enrollSpecialTip',
            hasSpecialTip = true
        )
    -->
</div>
<!-- /if -->
<!-- /for -->
<!-- /block -->
